[FIX] web_responsive: use env.isSmall for Odoo 19 compatibility#3549
Closed
stofer-smith wants to merge 1 commit into
Closed
[FIX] web_responsive: use env.isSmall for Odoo 19 compatibility#3549stofer-smith wants to merge 1 commit into
stofer-smith wants to merge 1 commit into
Conversation
Odoo 19's web.NavBar.AppsMenu template uses env.isSmall, not this.ui.isSmall (the latter was the Odoo 18 pattern). The xpath inheritance fails silently, causing the WebClient OWL component to throw and render a blank /odoo page. Two-line fix updates the xpath expression and the t-if branch inside the Dropdown replacement to match the current upstream template structure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Member
|
Why do you update one part of the code and not the rest? This has changed recently: odoo/odoo#263628, and that's why it has been changed. If you are using a frozen Docker version, then you should pin the version of this module. Closing as incorrect. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix a template xpath inheritance bug in
web_responsivethat prevents the WebClient from rendering on Odoo 19. Without this fix,/odooreturns a blank page with the following OWL error in the browser console:Root cause
web_responsive/static/src/components/apps_menu/apps_menu.xmlinherits theweb.NavBar.AppsMenutemplate and patches an element matched by//t[@t-if='this.ui.isSmall']. That expression matched the Odoo 18 template, but Odoo 19's upstreamweb.NavBar.AppsMenutemplate usesenv.isSmallinstead ofthis.ui.isSmall. The xpath fails silently, the template inheritance throws, and the WebClient OWL component never mounts.The current 19.0 head of the module ships this bug verbatim from the migration commit. Verified against current Odoo 19 on a fresh Community install:
grep -n "isSmall" /usr/lib/python3/dist-packages/odoo/addons/web/static/src/webclient/navbar/navbar.xmlshows onlyenv.isSmallreferences in the canonical template.Fix
Two-line change in
apps_menu.xml://t[@t-if='this.ui.isSmall']→//t[@t-if='env.isSmall']<t t-if="this.ui.isSmall">→<t t-if="env.isSmall">Both refer to the same underlying smallness check; the rename happened upstream when
useService("ui")was promoted toenv.isSmallin the Odoo 19 webclient.Reproduction (before this fix)
web_responsivefromOCA/web19.0 head/odooVerification (after this fix)
/odooTest plan
/odoorenders the fullscreen launcher after fresh login (withis_redirect_home=True)is_redirect_home=Falseenv.isSmallbranch)🤖 Generated with Claude Code